home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / comm / www / WWWworkbenchIB.lha / WWWworkbench / W4deletedir.ibrx < prev    next >
Encoding:
Text File  |  1998-09-10  |  1.1 KB  |  38 lines

  1. /* $VER: W4delete.ibrx  1.0
  2. *Made by Andres Pääbo (c)1998 : paabo@bancom.net
  3. */
  4. OPTIONS RESULTS
  5. screen=getclip('screen')
  6.  
  7. ADDRESS 'IBROWSE'
  8. 'QUERY TITLE'
  9. currdir=result
  10.  
  11.  
  12. ADDRESS COMMAND 'REQUESTFILE  > RAM:W4/resultstring   TITLE "Select DIRECTORY to DELETE"  NOICONS  DRAWER "'currdir'" PUBSCREEN "'screen'" DRAWERSONLY '
  13. if rc=5 then EXIT
  14. call open('resultstring','Ram:W4/resultstring',R)
  15. resultstring=readln('resultstring')
  16. resultstring=TRANSLATE(resultstring, ' ','"')
  17. resultstring=STRIP(resultstring)
  18. close('resultstring')
  19. len=LENGTH(resultstring)
  20. if RIGHT(resultstring,1)='/' then resultstring = LEFT(resultstring, len-1)
  21.  
  22. deleteall=''
  23. ADDRESS COMMAND 'C:REQUESTCHOICE >RAM:W4/resultstring 
  24. "DELETE FILES"  "Do you really want to delete  directory:'resultstring '? " "DELETE(empty dir)|!!DELETE(All)(Caution!!!)!!|_CANCEL"  PUBSCREEN "'screen'"'
  25. call open('resultstring','Ram:W4/resultstring',R)
  26. response=readln('resultstring')
  27. close('resultstring')
  28. if response=0 then EXIT
  29. if response=2  then deleteall='ALL'
  30. ADDRESS COMMAND 'DELETE "'resultstring'" 'deleteall''
  31.  
  32. call setclip('refresh', 1)
  33. ADDRESS COMMAND  'Sys:RexxC/RX   WWWworkbench/WWWworkbench.ibrx'
  34. EXIT 0
  35.  
  36.  
  37.  
  38.